#include <stdio.h>

/*
 * 常量与指针
 */

int main()
{
	static int a = 0x777;
	int *b = &a;
	int c = b[0];

	return 0;
}

#if 0

/*
 * intel
 */
0000000000001129 <main>:
    1129:	f3 0f 1e fa          	endbr64 
    112d:	55                   	push   %rbp
    112e:	48 89 e5             	mov    %rsp,%rbp
    1131:	48 8d 05 d8 2e 00 00 	lea    0x2ed8(%rip),%rax        # 4010 <a.2315>	rax=rip+0x2ed8
    1138:	48 89 45 f8          	mov    %rax,-0x8(%rbp)		// (rbp-0x8)=rip+0x2ed8
    113c:	48 8b 45 f8          	mov    -0x8(%rbp),%rax		// rax=(rbp-0x8)
    1140:	8b 00                	mov    (%rax),%eax		// eax=(rax)
    1142:	89 45 f4             	mov    %eax,-0xc(%rbp)		// (rbp-0xc)=eax
    1145:	b8 00 00 00 00       	mov    $0x0,%eax		// eax=0
    114a:	5d                   	pop    %rbp
    114b:	c3                   	retq   
    114c:	0f 1f 40 00          	nopl   0x0(%rax)

/*
 * arm
 */
000000000040051c <main>:
  40051c:	d10043ff 	sub	sp, sp, #0x10
  400520:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400524:	9100a000 	add	x0, x0, #0x28	// x0=411028
  400528:	f90007e0 	str	x0, [sp, #8]	// [sp+8]=x0
  40052c:	f94007e0 	ldr	x0, [sp, #8]	// x0=[sp+8]
  400530:	b9400000 	ldr	w0, [x0]	// w0=[x0]
  400534:	b90007e0 	str	w0, [sp, #4]	// [sp+4]=w0
  400538:	52800000 	mov	w0, #0x0                   	// #0
  40053c:	910043ff 	add	sp, sp, #0x10
  400540:	d65f03c0 	ret
  400544:	00000000 	.inst	0x00000000 ; undefined

#endif
